package com.gp.ssmplus.business.controller;


import com.gp.ssmplus.base.core.mybatis.base.BaseController;
import com.gp.ssmplus.base.core.mybatis.entity.EntityMap;
import com.gp.ssmplus.base.core.mybatis.model.PageModel;
import com.gp.ssmplus.base.core.mybatis.model.ResultBody;
import com.gp.ssmplus.base.core.mybatis.query.CriteriaQuery;
import com.gp.ssmplus.business.entity.GpAccount;
import com.gp.ssmplus.business.service.GpAccountService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author gp
 * @since 2020-02-23
 */
@RestController
@RequestMapping("/gpAccount")
public class GpAccountController extends BaseController<GpAccountService, GpAccount> {

    @GetMapping(value = "pageList")
    public ResultBody pageList(HttpServletRequest request, HttpServletResponse response) {
        PageModel pageModel = new PageModel(request);
        CriteriaQuery cq = new CriteriaQuery(pageModel, GpAccount.class);
        EntityMap requestMap = cq.getRequestMap();
        System.out.println(requestMap);
        ResultBody resultBody = bizService.pageList(pageModel);
        return resultBody;
    }
}

